package com.example.ailiyuncloud.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.ailiyuncloud.dto.CommoditySpuDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: lqj
 * @Date: 2024/05/26/16:53
 * @Description:
 */
@Repository
public interface CommoditySpuMapper extends BaseMapper<CommoditySpuDTO> {

    /**
     * 查询最新创建SPU数据
     *
     * @param number 条数
     * @return
     */
    List<CommoditySpuDTO> getCommoditySpuDTOList(@Param("number") Integer number);

    /**
     * 动态sql查询
     *
     * @param page                分页参数
     * @param CommoditySkuDtoList 动态数据
     * @Date 2024-05-27 15:07:55
     * @return List
     */
    List<CommoditySpuDTO> getCommoditySpuDTOListInfo(@Param("page") Page page, @Param("CommoditySkuDtoList") CommoditySpuDTO CommoditySkuDtoList);
}
